from typing import Union


# 变量，方法类型注解
def add(x: int, y: int) -> int:
    return x + y


print(add(1, 2))

my_list: list[Union[int, str]] = [1, 2, "xxt"]
my_list_two: list[int | str] = [1, 2, "xxt"]


def func(data: int | str) -> int | str:
    pass


func("xxt")

